package com.xy.blog.article.domain.dao;


import com.xy.blog.article.api.model.ArticleCategoryQuery;
import com.xy.blog.article.domain.dao.model.ArticleCategoryDO;
import com.xy.blog.article.domain.dao.model.ArticleCategoryRelDO;
import com.xy.blog.core.dao.IBaseCommonDao;

import java.util.List;


/**
 * @author zanhonglei
 * @version V1.0
 * @Description: 文章分类
 * @date 2020/5/24
 */
public interface IArticleCategoryDao extends IBaseCommonDao<ArticleCategoryDO, ArticleCategoryQuery> {

    void saveRel(ArticleCategoryRelDO item);


    List<ArticleCategoryRelDO> selectRel(ArticleCategoryRelDO item);

    void deleteRelByCategoryId(Long id);

    void deleteRelByArticleId(Long id);

    void deleteRelById(Long id);


    List<ArticleCategoryDO> listByLevel(String level);

    /**
     * 查询所有
     * @return
     */
    List<ArticleCategoryDO> listAll();

    /**
     * 查询跟节点
     * @return
     */
    List<ArticleCategoryDO> listParents();



}
